subroutine check_readsink(cunit)
  use param
  use sink_data_param,only:n_sink_type
  use sink_data_param,only:sink_type
  use label_data_param,only:obj_type
  implicit none

  integer,intent(in) :: cunit

  integer :: i,j,k,n,pos1,pos2,in1,in2,in3
  character(len=len_linebuf) :: str

  if (n_sink_type.eq.0) return

  in1=1
  in2=2
  in3=3

  call log_msg1(cunit,"")
  call log_msg1(cunit,"Check sink data... (geom_obj+obj)")
  call log_msg1(cunit,"")

  write(str,'("index",1x,"gid",1x,"obj",1x,"prod",1x,&
       "Eb",1x,"nu",1x,"Rd")') 
  call log_msg1_indent(cunit,in1,str)

  do i=1,n_sink_type

     ! index
     pos1=0
     pos2=pos1+7
     write(str(pos1+1:pos2),'("[",i5.5,"]")') i
     pos1=pos2

     do j=1,sink_type(i)%n_data

        ! id of geom_obj
        pos2=pos1+3
        write(str(pos1+1:pos2) ,'(1x,i2)') &
             sink_type(i)%gid
        pos1=pos2

        pos2=pos1+3
        write(str(pos1+1:pos2),'(1x,"+",1x)')
        pos1=pos2

        ! id of obj_type
        n=sink_type(i)%lid
        pos2=pos1+17
        write(str(pos1+1:pos2),'(1x,a10,1x,"(",i3.3,")")') &
             obj_type(n)%name,n
        pos1=pos2

        pos2=pos1+4
        write(str(pos1+1:pos2),'(1x,"->",1x)')
        pos1=pos2

        do k=1,sink_type(i)%n_new(j)
           pos2=pos1+12
           write(str(pos1+1:pos2),'(1x,a10,1x)') &
                sink_type(i)%new(j)%prod_type(k)
           pos1=pos2
        end do

        pos2=pos1+4
        write(str(pos1+1:pos2),'(1x,"(",i1,")")') &
             sink_type(i)%n_new(j)
        pos1=pos2

        pos2=pos1+17
        write(str(pos1+1:pos2),'(1x,"Eb=",1pe13.5)') &
             sink_type(i)%react_eb(j)
        pos1=pos2

        pos2=pos1+17
        write(str(pos1+1:pos2),'(1x,"nu=",1pe13.5)') &
             sink_type(i)%react_nu(j)
        pos1=pos2

        pos2=pos1+17
        write(str(pos1+1:pos2),'(1x,"Rd=",1pe13.5)') &
             sink_type(i)%react_rd(j)
        pos1=pos2

        call log_msg1_indent(cunit,in1,str(1:pos2))
     end do
  end do
  return

end subroutine check_readsink
